<?php

//引入必要的函数库
include_once dirname(__FILE__)."/config.php";
include_once dirname(__FILE__)."/util.class.php";
include_once dirname(__FILE__)."/email.class.php";
include_once dirname(__FILE__)."/log.class.php";
include_once dirname(__FILE__)."/mysql.class.php";
include_once dirname(__FILE__)."/stringutils.class.php";
include_once dirname(__FILE__)."/template.ease.php";
include_once dirname(__FILE__)."/func.php";

//设置报错处理机制

if(!$config[debug]){
	error_reporting(0);
}

//设置时区
date_default_timezone_set($config[timezone]);

//定义log
$log = new log($config[logdir],$config[debug]);

//定义数据库连接
$db = new mysql($config[db][database],$config[db][username],$config[db][password],$config[db][port],$config[db][host],$config[db][charset],$config[db][pconnect],$log,$config[debug]);

//创建模版对象
$tl = new template();

//创建功能类
$func = new func($config,$db,$log);

//配置服务器环境
session_start();

$check_brower = $func->check_brower();
if($check_brower!=null){
	$func->error("e12080801",$check_brower);
}

//$func->log_pageview();
?>
